package cn.xinfei.xdecision.listener;

import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.context.environment.EnvironmentChangeEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class EnvironmentChangeEventListener {

    @EventListener
    public void envListener(EnvironmentChangeEvent event) {
        log.info("===================EnvironmentChangeEvent============================");
        log.info(JSONObject.toJSONString(event));
    }
}
